
<!DOCTYPE html>
<html lang="en">

    <head>

        <meta charset="utf-8">
        <title>企业用户注册</title>
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta name="description" content="">
        <meta name="author" content="">


        <link rel="stylesheet" href="/stylesheets/bootstrap.min.reg.css">
        <link rel="stylesheet" href="/stylesheets/registercss.css">
        <link rel="stylesheet" href="/stylesheets/validation.css">
        <!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
        <!--[if lt IE 9]>
            <script src="/javascripts/html5.js"></script>
        <![endif]-->



    </head>

    <body  style="background: url(/images/hdbg.png) 0 0 repeat-x #eee;top:0;">

        <div class="header">
            <div class="container">
                <div class="row">
                    <div class="logo span6">
                        <h2><img src="images/wifi3.png" style="height: 48px"/><span  style="color: #54992D">无线路由业务管理平台</span></h2>
                    </div>
                    <div class="links span6">
                        <a class="home" href="login.html" rel="tooltip" data-placement="bottom" data-original-title="登录"></a>
                    </div>
                </div>
            </div>
        </div>


        <div class="register-container container">
            <div class="row">
                <div class="register span8"  id="regtable"  >
                    <form id="validation" method="post">
                        <h2>企业用户注册</h2>
                        <div class="row ">
                            <div class="span1">账号:</div>
                            <div class="span3"><input type="text" id="username" name="username"   class="validate[required,minSize[4],maxSize[20],ajax[ajaxValidCall]]"  value=""/></div>
                            <div class="span3">* 字母开头，由4~20位字母、数字、下划线组成；区分大小写</div>
                        </div>
                        <div class="row ">
                            <div class="span1">密码:</div>
                            <div class="span3"><input type="password" id="userpwd" name="userpwd"   class="validate[required,minSize[3],maxSize[20] ]"  value=""/></div>
                            <div class="span3">* 字母开头，由3~20位字母、数字、下划线组成；区分大小写</div>
                        </div>
                        <div class="row ">
                            <div class="span1">重复密码:</div>
                            <div class="span3"><input type="password" id="passwd1" name="passwd1"   class="validate[equals[userpwd] required,minSize[3],maxSize[20]]"  value=""/></div>
                            <div class="span3">* 请再次输入密码</div>
                        </div>

                        <div class="row ">
                            <div class="span1">姓名/昵称:</div>
                            <div class="span3"><input type="text" id="usernick" name="usernick"   class="validate[required,minSize[2],maxSize[20] ]"  value=""/></div>
                            <div class="span3">* 请填写您的姓名</div>
                        </div>

                        <div class="row ">
                            <div class="span1">商户名称:</div>
                            <div class="span3"><input type="text" id="companyname" name="companyname"   class="validate[required,minSize[2],maxSize[20]]"  value=""/></div>
                            <div class="span3">* 请填写您的商户名称，如XX咖啡连锁店</div>
                        </div>

                        <div class="row ">
                            <div class="span1">联系电话:</div>
                            <div class="span3"><input type="text" id="phonenumber" name="phonenumber"   class="validate[required,custom[phone],minSize[6],maxSize[14]]"  value=""/></div>
                            <div class="span3">* 手机或固定电话号码</div>
                        </div>

                        <div class="row ">
                            <div class="span1">EMAIL:</div>
                            <div class="span3"><input type="text" id="email" name="email"   class="validate[required,custom[email],minSize[6],maxSize[32],ajax[ajaxValidCall]]"  value=""/></div>
                            <div class="span3">* 邮箱用于找回密码</div>
                        </div>


                        <button type="submit">注册企业用户</button>
                    </form>
                </div>

                <div class="span8" id="regstatus" style=" display:none;">
                    <div class="alert alert-info">
                        <h4>企业用户注册</h4>
                        <br>
                        <h1 id="retinfo">
                        </h1>
                    </div>
                </div>

                <div class="iphone span4">
                    <div class="alert alert alert-success">
                        <br>
                        &nbsp;&nbsp;已经注册过企业用户？<a href="login.html" >请直接登录</a>
                        <br><BR>
                        &nbsp;&nbsp;忘记密码？ &nbsp;&nbsp;&nbsp;<a href="forgetpwd.html" >请点击此处找回密码</a><BR><br>
                    </div>
                </div>
            </div>
        </div>
		<div align="center">Copyright &copy; 2014.无线路由管理平台.<a target="_blank" href="#"></a>
</div>
        <!-- Javascript -->
        <script src="/javascripts/jquery-1.8.2.min.js"></script>
        <script src="/javascripts/bootstrap.min.js"></script>
        <script src="/javascripts/jquery.backstretch.min.js"></script>


        <script type='text/javascript' src='/javascripts/plugins/validation/languages/jquery.validationEngine-zh_CN.js' charset='utf-8'></script>
        <script type='text/javascript' src='/javascripts/plugins/validation/jquery.validationEngine.js' charset='utf-8'></script>

        <script type='text/javascript' src='/javascripts/plugins/ajaxsubmit/jquery.form.min.js' charset='utf-8'></script>


        <!--<script src="/javascripts/scripts.js"></script>-->


        <script type="text/javascript">

            $(document).ready(function(){


                $("#validation").validationEngine({promptPosition : "topLeft", scroll: false});
                var options = {
                    // target:        '#output',   // target element(s) to be updated with server response
                    url: "register.html",
                    success:       showResponse,
                    resetForm: false,
                    type:"post",
                    dataType:  'json'

                    // other available options:
                    //url:       url         // override for form's 'action' attribute
                    //type:      type        // 'get' or 'post', override for form's 'method' attribute
                    //dataType:  null        // 'xml', 'script', or 'json' (expected server response type)
                    //clearForm: true        // clear all form fields after successful submit
                    //resetForm: true        // reset the form after successful submit

                    // $.ajax options can be used here too, for example:
                    //timeout:   3000
                };
                // bind to the form's submit event
                $('#validation').submit(function() {
                    if(!$("#validation").validationEngine("validate")) return false;
                    $(this).ajaxSubmit(options);
                    return false;
                });
                // pre-submit callback
                function showRequest(formData, jqForm, options) {
                    if(!$("#validation").validationEngine("validate"))
                    {
                        return false;
                    }
                    return true;
                }

                // post-submit callback
                function showResponse(responseText, statusText)  {
                    $("#regtable").remove();
                    $("#regstatus").show();
                    $("#retinfo").html(responseText.info);

                }






            });



        </script>


    </body>
</html>